<!--
 * @Author: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @Date: 2022-08-25 20:26:31
 * @LastEditors: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @LastEditTime: 2022-08-27 10:02:20
 * @FilePath: \后端管理系统\app\src\views\Goods\component\ParamsComponent\ParamsTabPane.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <!-- 添加参数组件 -->
    <ParamAdd :title-text="titleText" :is-btn-disabled="isBtnDisabled">
      <template v-slot:title>添加{{ titleText }}</template>
    </ParamAdd>

    <el-table :data="tableData" border style="width: 100%">
      <el-table-column prop="attr_name" label="参数名称"> </el-table-column>
      <el-table-column fixed="right" label="操作" width="100">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small"
            >查看</el-button
          >
          <el-button type="text" size="small">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import ParamAdd from "./ParamAdd.vue";
export default {
  components: {
    ParamAdd,
  },
  props: {
    // 添加标题
    titleText: {
      type: String,
      default: "",
    },
    isBtnDisabled: {
      type: Boolean,
      default: false,
    },
    tableData: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  data() {
    return {};
  },
};
</script>